<template>
    <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick">

    </el-tree>
</template>
<script>
export default {
    data() {
      return {
        defaultProps: {
          children: 'children',
          label: 'label'
        }
      };
    },
    props: {
      treeData: {
        type: Array,
        default () {
          return false
        }
      }
    },
    methods: {
      handleNodeClick:function(data) {
        if(data.key == 4){
          this.$emit("emitTreeData", data)
        }
      }
    }
}
</script>

